﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminPanel/AdminSite.Master" AutoEventWireup="true" CodeBehind="VehicleFullView.aspx.cs" Inherits="FastTrackCabService.AdminPanel.VehicleFullView" %>
<%@ Import Namespace="BusinessLogicLayer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../Style/FullView.css" rel="stylesheet" type="text/css"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:DetailsView ID="DetailsView1" CssClass="detailsView" runat="server"
                     AutoGenerateEditButton="True" AutoGenerateRows="False" CellPadding="4"
                     DataSourceID="odsVehicle" ForeColor="#333333" GridLines="None"
                     HeaderText="Vehicle details" onmodechanging="DetailsView1_ModeChanging">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775"/>
        <CommandRowStyle BackColor="#E2DED6" Font-Bold="True"/>
        <EditRowStyle BackColor="#999999"/>
        <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True"/>
        <Fields>
            <asp:BoundField DataField="RegistrationNo" HeaderText="Registration No"
                            SortExpression="RegistrationNo"/>
            <asp:TemplateField HeaderText="Subsidiary" SortExpression="SubsidiaryId">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# CityBLL.GetCityById(SubsidiaryBLL.GetCityIdBySubsidiaryId(Convert.ToInt32(Eval("SubsidiaryId")))).Name %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Supervisor" SortExpression="SupervisorId">
                <ItemTemplate>
                    <%# "<a href='SupervisorFullView.aspx?staffId=" + Eval("SupervisorId") + "'>" + StaffBLL.GetStaffById(Convert.ToInt32(Eval("SupervisorId"))).FirstName + "</a>" %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Type" HeaderText="Type"
                            SortExpression="Type"/>
        </Fields>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"/>
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"/>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center"/>
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333"/>
    </asp:DetailsView>
    <asp:ObjectDataSource ID="odsVehicle" runat="server"
                          onselecting="odsVehicle_Selecting" SelectMethod="GetVehiclesByRegNo"
                          TypeName="BusinessLogicLayer.VehicleBLL">
        <SelectParameters>
            <asp:Parameter Name="registrationNo" Type="String"/>
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>